package com.xwli.javase.thread.impl;

/**
 * @program: springcloud
 * @description: 继承Thread类来使用多线程
 * @author: xwli
 * @create: 2022-03-12 15:06
 **/
public class MySubThread extends Thread{
    /**
    * @description: 需要执行的任务
    * @params: []
    * @return: void
    * @author: xwli
    * @date: 2022/3/12 15:08
    */
    @Override
    public void run() {
        try {
            //Thread.sleep(3000);
            //Thread.yield();
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println("开始执行Thread子类的任务");
    }
}
